package br.edu.fapi.gestao.pg.servico;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import br.edu.fapi.gestao.pg.dominio.Monitor;
import br.edu.fapi.gestao.pg.repositorio.RepositorioMonitorImpl;

@Service("servicoValidadorLogin")
public class ServicoValidadorLoginImpl implements Serializable{

	private static final long serialVersionUID = 1L;
	
	@Autowired
	private RepositorioMonitorImpl repositorioMonitor;
	
	
	public boolean validarLogin(String usuario, String senha){
		List<Monitor> monitor = repositorioMonitor.validarUsuario(usuario, senha);
		if(!monitor.isEmpty()){
			return true;
		}
		return false;
		 
	}
}
